#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

   connect(this,&Widget::mysignal,this,&Widget::handle);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    emit mysignal();
}

void Widget::handle()
{
    setWindowTitle("~~~~~~~~~~~~~~~~~~~");
}
